<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>登录页面</title>
</head>
<body>
    <!--判断是否有error参数，有就提升错误-->
    <span th:if="${param.error}" style="color:red">账号或密码错误</span>
    <!--账号密码提交给security的login方法-->
    <form th:action="@{/login}" method="post">
        <!--账号密码的表单域必须叫username和password-->
        账号：<input type="text" name="username" placeholder="请填写账号"><br>
        密码：<input type="password" name="password" placeholder="请填写密码"><br>
        记住我：<input type="checkbox" name="rememberMe" checked="true"><br>
        <input type="submit" value="登录">
    </form>
</body>
</html>
